package cn.wyz.org.domain;

import cn.wyz.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department extends BaseDomain {
        private String sn;
        private String name;

        //新增的,实现无限层级的封装类,默认声明一个空的集合
        //这个注释是为了让空的集合不返回
        @JsonInclude(JsonInclude.Include.NON_EMPTY)
        private List<Department> children = new ArrayList<>();

        private String dirPath;
        private Integer state;
        private Long manager_id;
        private Long parent_id;
        private Long shop_id;

        //新增的上级部门封装类
        private Department parent;
        //新增的管理员名称
        private Employee manager;
}
